

package com.hazelcast.instance.impl;

import com.hazelcast.core.HazelcastInstanceNotActiveException;
import com.hazelcast.core.LifecycleListener;
import com.hazelcast.core.LifecycleService;

import javax.annotation.Nonnull;
import java.util.UUID;

public final class TerminatedLifecycleService implements LifecycleService {

    @Override
    public boolean isRunning() {
        return false;
    }

    @Override
    public void shutdown() {
    }

    @Override
    public void terminate() {
    }

    @Nonnull
    @Override
    public UUID addLifecycleListener(@Nonnull LifecycleListener lifecycleListener) {
        throw new HazelcastInstanceNotActiveException();
    }

    @Override
    public boolean removeLifecycleListener(@Nonnull UUID registrationId) {
        throw new HazelcastInstanceNotActiveException();
    }
}
